// 渲染左侧新闻列表
function initNewsleft(parent, data) {
  var el = ''
  for (var key in data) {
    var currentData = data[key]
    var temp =
      '<li class="need-text-overflow"><a target="_blank" href="' +
      currentData.link +
      '"rel="nofollow">' +
      currentData.title +
      '</a></li>'
    el += temp
  }
  parent.append(el)
}
// 渲染中间新闻列表
function initNewscontent(parent, data) {
  var el = ''
  for (var key in data) {
    var currentData = data[key]
    var temp =
      '<li><a target="_blank" href="' +
      currentData.link +
      '"rel="nofollow">' +
      '                  <img class="img-center' +
      (+key + 1) +
      '" src="' +
      currentData.image +
      '" alt="' +
      currentData.title +
      '"/>' +
      '                  <p class="need-text-overflow">' +
      currentData.title +
      '</p>' +
      '                </a></li>'
    el += temp
  }
  parent.append(el)
}
// 渲染中间右侧列表
function initNewsright(parent, data) {
  var elImg =
    '<li><a target="_blank" href="' +
    data[0].link +
    '"rel="nofollow">' +
    '<img class="img-right" src="' +
    data[0].image +
    '" alt="' +
    data[0].title +
    '" /></a></li>'
  var el = ''
  var dataRight = data.slice(1, 6)
  for (var key in dataRight) {
    var currentData = dataRight[key]
    var temp =
      '<li class="need-text-overflow"><a target="_blank" href="' +
      currentData.link +
      '"rel="nofollow">' +
      currentData.title +
      '</a></li>'
    el += temp
  }
  parent.append(elImg + el)
}
